<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>UserEdit</title>
    <link href="/layui/css/layui.css" type="text/css" rel="stylesheet">
    <script src="/layui/layui.js"></script>
    <script src="/js/libSys/commonHeader.js" rel="script"></script>
</head>
<body>

<div class="layui-container">
    <br>
    <br>
    <br>
    <form th:action="@{/user/userEditPost}" method="post" class="layui-form">
        <input style="display:none" name="userId" th:value="${userData.userId}">
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-inline">
                <input type="text" name="username" required  lay-verify="required" id="usernameCheck" placeholder="请输入用户名" autocomplete="off" class="layui-input" th:value="${userData.username}">
            </div>
            <div class="layui-form-mid layui-word-aux" id="usernameCheckNotice">提示</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-inline">
                <input type="text" name="sex" required  lay-verify="required" placeholder="请输入“男”/“女”" autocomplete="off" class="layui-input" th:value="${userData.sex}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-inline">
                <input type="text" name="email" required  lay-verify="required|email" placeholder="请输入邮箱" autocomplete="off" class="layui-input" th:value="${userData.email}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-inline">
                <input type="text" name="telphone" required  lay-verify="required|phone" placeholder="请输入手机号" autocomplete="off" class="layui-input" th:value="${userData.telphone}">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="registerButton" type="submit">立即提交</button>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['form','jquery','layer'],function(){
        var form = layui.form;
        var layer = layui.layer;
        var $ = layui.jquery;
        form.on("submit(registerButton)",function(data){

        });
        <!--$("#usernameCheck").on("change",function(){-->
            <!--var text = $(this).val();-->
            <!--$.ajax({-->
                <!--url:"/registerUsernameCheck/"+text,-->
                <!--data:text,-->
                <!--success:function(data){-->
                    <!--if(data=="no"){-->
                        <!--layer.msg("用户名已经存在！");-->
                        <!--$("#usernameCheckNotice").text("用户名已经存在！");-->
                    <!--}-->
                    <!--else{-->
                        <!--$("#usernameCheckNotice").text("该用户名可以注册");-->
                    <!--}-->
                <!--}-->
            <!--});-->
        <!--});-->
    });
</script>




</body>
</html>